package com.basic.thread;

class Parent{
    static {
        System.out.println("parent static");
    }

    public Parent() {
        System.out.println("parent constructor");
    }

    public void method() {
        System.out.println("parent method");
    }
}

class Child extends Parent{
    static {
        System.out.println("child static");
    }

    public Child() {
        System.out.println("child constructor");
    }

    public void method() {
        System.out.println("child method");
    }
}
public class DuoTai {

    public static void main(String[] args) {
        Parent child = new Child();
        child.method();
    }
}
/**
 * parent static
 * child static
 * parent constructor
 * child constructor
 * child method
 */